home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: Help !!!!! on 'strstr"
- Date: 14 Mar 96 18:07:32 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.826826852@rscernix>
- References: <314703FF.4045@msmail.st.stems.com> <jodellDo7097.Bto@netcom.com> <TANMOY.96Mar13090926@qcd.lanl.gov> <3147C7AC.6EE3@hsc.unt.edu>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <3147C7AC.6EE3@hsc.unt.edu> Steve Fogoros <sfogoros@hsc.unt.edu> writes:
-
- >Tanmoy Bhattacharya wrote:
- >
- >> Any user function whose name begins with `is' followed by a lower case
- >> letter violates the ANSI C standard.
- >
- >You mentioned the same kind of violation regarding user functions that start with
- >'str' followed by lower case letter in another post. I apologize that I question
- >this without being intimately familiar with ANSI C Standard. I am having a hard time
- >believing the standard would consider my use of other than reserved words a violation.
- >(What kind of ticket would I get for an infraction? Is the implementation required to
- >check for this and warn or error?)
-
- No. This kind of "infraction" invokes undefined behaviour and the
- compiler is free to do anything it wants.
-
- >Seriously, I will look this up because it seems strange to me and I didn't know
- >anything about it. I quick scanned my K&R2 but did not find anything there.
-
- Here's the complete list of reserved external names.
-
- 4.13 FUTURE LIBRARY DIRECTIONS
-
- The following names are grouped under individual headers for
- convenience. All external names described below are reserved no
- matter what headers are included by the program. ^^^^^^^^
-
-
- 4.13.1 Errors <errno.h>
-
- Macros that begin with E and a digit or E and an upper-case letter
- (followed by any combination of digits, letters and underscore) may be
- added to the declarations in the <errno.h> header.
-
-
- 4.13.2 Character handling <ctype.h>
-
- Function names that begin with either is or to , and a lower-case
- letter (followed by any combination of digits, letters and underscore)
- may be added to the declarations in the <ctype.h> header.
-
-
- 4.13.3 Localization <locale.h>
-
- Macros that begin with LC_ and an upper-case letter (followed by
- any combination of digits, letters and underscore) may be added to the
- definitions in the <locale.h> header.
-
-
- 4.13.4 Mathematics <math.h>
-
- The names of all existing functions declared in the <math.h>
- header, suffixed with f or l , are reserved respectively for
- corresponding functions with float and long double arguments and
- return values.
-
-
- 4.13.5 Signal handling <signal.h>
-
- Macros that begin with either SIG and an upper-case letter or SIG_
- and an upper-case letter (followed by any combination of digits,
- letters and underscore) may be added to the definitions in the
- <signal.h> header.
-
-
- 4.13.6 Input/output <stdio.h>
-
- Lower-case letters may be added to the conversion specifiers in
- fprintf and fscanf . Other characters may be used in extensions.
-
-
- 4.13.7 General utilities <stdlib.h>
-
- Function names that begin with str and a lower-case letter
- (followed by any combination of digits, letters and underscore) may be
- added to the declarations in the <stdlib.h> header.
-
-
- 4.13.8 String handling <string.h>
-
- Function names that begin with str , mem , or wcs and a lower-case
- letter (followed by any combination of digits, letters and underscore)
- may be added to the declarations in the <string.h> header.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-